package org.springframework.influxdb;

import java.util.Date;

import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;
import org.influxdb.annotation.TimeColumn;

import lombok.Data;

/**
 * 实时数据
 * 
 * @author peishaoguo
 *
 */
@Measurement(name = "storage")
@Data
public class PointRealtime {
	@Column(name = "pointId", tag = true)
	private String pointId;
	private String value;
	@TimeColumn
	private Long time;

	private transient Date datetime;

	public Date getDatetime() {
		datetime = new Date(time);
		return datetime;
	}

}
